package com.sz.biz.common.contract.service;

import com.sz.biz.common.contract.entity.ContContractor;
import com.sz.biz.common.contract.dto.ContContractorDto;

import java.util.List;
import java.util.Map;

/**
 * Package: com.sz.biz.common.contract.service<br>
 * Function: 合同方service
 * Author: yanhong.xiao.<br>
 * Date: 2017-07-19 16:09:00.
 */
public interface ContContractorService {

    /**
     * 保存合同方
     * @param contContractorDto
     */
    void save(ContContractorDto contContractorDto);

    /**
     * 批量保存
     * @param contContractorDtos
     */
    void batchSave(List<ContContractorDto> contContractorDtos);

    /**
     * 根据类型，批量删除对应的relIds下面的合同方
     * @param contTypeEnum
     * @param relIds
     */
    void batchDeleteByRelIds(ContTypeEnum contTypeEnum, List<Integer> relIds);

    /**
     * 根据relId获取合同方
     * @param contTypeEnum
     * @param relId
     * @return
     */
    List<ContContractor> getContractorsByRelId(ContTypeEnum contTypeEnum,Integer relId);


    Map<String,ContContractorDto> getContractorDtosByRelId(ContTypeEnum contTypeEnum, Integer relId);

    List<ContContractor> getContractorsByRelIds(ContTypeEnum contTypeEnum,List<Integer> relIds);

    Map<Object,Map<String,ContContractorDto>> getContractorDtos(List<ContContractor> contractorList);

}
